package com.dj.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author Dev_J
 * @date 2020-12-10 23:37
 */

/**
 * @Configuration配置股文件注解
 * @Bean-->applicationContext.xml `<bean id="" class=""></bean>`
 */
@Configuration
public class ApplicationContextConfig {
    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate(){
        return new RestTemplate();

    }

}
